home *** CD-ROM | disk | FTP | other *** search
Wrap
global currentcard, founstart, orig, fromdis, discard, deck, enditat, iwin on mouseUp me if currentcard > 0 then if sprite(currentcard).visible then if (the mouseH > 345) and (the mouseV > 80) and (the mouseV < 245) then checkaces() else if fromdis then append(discard, sprite(currentcard).memberNum) sprite(51).memberNum = discard[count(discard)] sprite(51).visible = 1 else sprite(orig).visible = 1 end if end if sprite(currentcard).visible = 0 puppetSound("dropcard") currentcard = 0 fromdis = 0 orig = 0 fillSpots() c = 0 repeat with blah = 41 to 48 if (sprite(blah).memberNum <> 53) and ((sprite(blah).memberNum mod 13) = enditat) then c = c + 1 end if end repeat if c = 8 then updateStage() iwin = 1 go("over") else checkgameover() end if end if end if end on fillSpots repeat with blah = 28 to 31 if sprite(blah).visible = 0 then if count(deck) > 0 then sprite(blah).memberNum = deck[1] sprite(blah).visible = 1 deleteAt(deck, 1) if count(deck) = 0 then end if next repeat end if if count(discard) > 0 then sprite(blah).memberNum = discard[1] sprite(blah).visible = 1 deleteAt(discard, 1) if count(discard) = 0 then sprite(51).visible = 0 sprite(51).memberNum = 53 end if end if end if end repeat repeat with blah = 34 to 37 if sprite(blah).visible = 0 then if count(deck) > 0 then sprite(blah).memberNum = deck[1] sprite(blah).visible = 1 deleteAt(deck, 1) if count(deck) = 0 then end if next repeat end if if count(discard) > 0 then sprite(blah).memberNum = discard[1] sprite(blah).visible = 1 deleteAt(discard, 1) if count(discard) = 0 then sprite(51).visible = 0 sprite(51).memberNum = 53 end if end if end if end repeat if sprite(27).visible = 0 then blackletterday(27) else if sprite(32).visible = 0 then blackletterday(32) else if sprite(33).visible = 0 then blackletterday(33) else if sprite(38).visible = 0 then blackletterday(38) end if end if end if end if end on blackletterday who mynum = 0 repeat with blah = 7 to 26 if (sprite(blah + 1).visible = 0) and (sprite(blah).visible = 1) then mynum = blah end if end repeat if mynum = 0 then mynum = 26 end if if sprite(mynum).visible then sprite(who).memberNum = sprite(mynum).memberNum - 78 sprite(who).visible = 1 sprite(mynum).visible = 0 else if count(discard) > 0 then sprite(who).memberNum = discard[count(discard)] sprite(who).visible = 1 deleteAt(discard, count(discard)) if count(discard) > 0 then sprite(51).memberNum = discard[count(discard)] else sprite(51).visible = 0 sprite(51).memberNum = 53 end if else if count(deck) > 0 then sprite(who).memberNum = deck[1] sprite(who).visible = 1 deleteAt(deck, 1) end if end if end if end on checkaces if (the mouseV > 80) and (the mouseV < 161) then if (the mouseH > 345) and (the mouseH < 407) then doitaces(41) else if (the mouseH > 406) and (the mouseH < 465) then doitaces(42) else if (the mouseH > 464) and (the mouseH < 523) then doitaces(43) else if (the mouseH > 522) and (the mouseH < 581) then doitaces(44) end if end if end if end if else if (the mouseV > 160) and (the mouseV < 250) then if (the mouseH > 345) and (the mouseH < 407) then doitaces(45) else if (the mouseH > 406) and (the mouseH < 465) then doitaces(46) else if (the mouseH > 464) and (the mouseH < 523) then doitaces(47) else if (the mouseH > 522) and (the mouseH < 581) then doitaces(48) end if end if end if end if end if end if end on doitaces who if sprite(who).memberNum = 53 then if (sprite(currentcard).memberNum mod 13) = founstart then sprite(who).memberNum = sprite(currentcard).memberNum sprite(who).visible = 1 else if fromdis then append(discard, sprite(currentcard).memberNum) sprite(51).memberNum = discard[count(discard)] sprite(51).visible = 1 else sprite(orig).visible = 1 end if end if else if (sprite(currentcard).memberNum mod 13) <> founstart then if ((sprite(currentcard).memberNum - 1) = sprite(who).memberNum) or (((sprite(currentcard).memberNum mod 13) = 1) and ((sprite(who).memberNum - 12) = sprite(currentcard).memberNum)) then sprite(who).memberNum = sprite(currentcard).memberNum sprite(who).visible = 1 else if fromdis then append(discard, sprite(currentcard).memberNum) sprite(51).memberNum = discard[count(discard)] sprite(51).visible = 1 else sprite(orig).visible = 1 end if end if end if end if end on exitFrame me go(the frame) end